package softwaredepartment.zxit.com.pt_3280cinandroid;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.LinearLayout;

import static java.lang.Thread.sleep;

public class MainActivity extends AppCompatActivity {

    private Thread threadToCloseTransition;
    private Handler handler;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        threadToCloseTransition = new Thread(new CloseTransitionThread());
        threadToCloseTransition.start();
    }
    class CloseTransitionThread implements  Runnable{

        @Override
        public void run() {
            try {
                sleep(3000);
                Intent intent = new Intent(MainActivity.this,FunctionsActivity.class);
                startActivity(intent);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

    @Override
    protected void onPause() {
        super.onPause();
        finish();
    }
}
